package problema002;

public class FibPares {
	
	public static void main(String[] args){
		System.out.println(fibPares());
	}
	
	public static int fibPares(){
		int res = 0, ant1 = 1, ant2 = 1, act = 0;
		while(act < 4000000){
			act = ant1 + ant2;
			ant2 = ant1; ant1 = act;
			if(act % 2 == 0) res += act;
		}
		return res;
	}
	

}
